<template>
  <div class="new-tab-page large">
    <div class="page-main-title">
      选择账号
    </div>

    <div class="content">
      <el-select
        v-if="merchantList && merchantList.length > 0"
        v-model="selectedMerchant"
        placeholder="公司名称"
        size="small"
      >
        <el-option v-for="item in merchantList" :key="item.id" :label="item.businessName" :value="item.id"> </el-option>
      </el-select>

      <router-link
        v-if="$route.query.payPlatform !== 'WEIXIN'"
        :to="{
          path: '/valueAdded/savePayMerchantInfo',
          query: { merchantId: query.merchantId, parkId: query.parkId, payPlatform: query.payPlatform }
        }"
        class="add-icon"
        target="_blank"
      >
        <i class="el-icon-circle-plus"></i>
        新建账号
      </router-link>

      <router-link
        v-else-if="$route.query.payPlatform === 'WEIXIN'"
        :to="{
          path: '/valueAdded/applyLittleCustom',
          query: { merchantId: query.merchantId, parkId: query.parkId, payPlatform: query.payPlatform }
        }"
        class="add-icon"
        target="_blank"
      >
        <i class="el-icon-circle-plus"></i>
        新建账号
      </router-link>

      <!-- <a href="javascript:;" class="add-icon">
        <i class="el-icon-circle-plus"></i>
        新建账号
      </a> -->
    </div>
    <div class="action">
      <el-button type="primary" size="small" @click="changeParkPayMerchantAccount">提交</el-button>
    </div>
  </div>
</template>

<script src="./index.js"></script>

<style lang="less" scoped>
@import './index.less';
</style>
